using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;

namespace SharpErp.UI.BasicData
{
    public partial class MaterialInfoPrintDialog : UI.Common.BaseDialogForm
    {
        public List<Data.Common.View.GoodsBarcodeView> Materials { get; set; }

        public MaterialInfoPrintDialog()
        {
            InitializeComponent();

            AfterLoad += MaterialInfoPrintDialog_AfterLoad;
        }

        private void MaterialInfoPrintDialog_AfterLoad(object sender, EventArgs e)
        {
            var source = new MaterialBarcodeReport();
            source.SetDataSource(Materials);
            this.documentViewer1.DocumentSource = source;
            source.CreateDocument();
        }
    }
}